Teach the Lit configuration to actually use the cxx0x setting when constructing compile flags, and to link against the 'rt' library on Linux for clock_gettime and friends. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124052 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/lit.cfg b/test/lit.cfg index 9feeee2..d8023fd 100644 --- a/test/lit.cfg +++ b/test/lit.cfg
@@ -134,16 +134,21 @@ else: libcxx_obj_root = "/usr" +# Configure extra compiler flags. +compile_flags = [] +if getattr(config, 'cxx_has_stdcxx0x_flag', False): + compile_flags += ['-std=c++0x'] + # Configure extra libraries. libraries = [] if sys.platform == 'darwin': libraries += ['-lSystem'] if sys.platform == 'linux2': - libraries += ['-lgcc_eh', '-lsupc++', '-lc', '-lm', '-lgcc_s'] + libraries += ['-lgcc_eh', '-lsupc++', '-lc', '-lm', '-lrt', '-lgcc_s'] libraries += ['-Wl,-R', libcxx_obj_root + '/lib'] config.test_format = LibcxxTestFormat(cxx_under_test, - cpp_flags = ['-nostdinc++'] + include_paths, + cpp_flags = ['-nostdinc++'] + compile_flags + include_paths, ld_flags = ['-nodefaultlibs'] + library_paths + ['-lc++'] + libraries) config.target_triple = None